home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / rex.lha / rex / m2c / Makefile < prev    next >
Makefile  |  1992-08-18  |  4KB  |  224 lines

  1. BIN    = $(HOME)/bin
  2. LIB    = $(HOME)/lib
  3. OPT    = -O
  4. CC    = cc
  5.  
  6.                 # C library (reuse)
  7. REUSE    = ../../reuse/m2c
  8.  
  9.                 # C libraries
  10. CLIBS    = $(REUSE)/libreuse.a
  11.  
  12.                 # options for C compiler
  13. CFLAGS    = -w -I$(REUSE) $(OPT)
  14.  
  15. MFLAGS    = -c
  16.  
  17. all    : rex
  18.  
  19. install:    rex rex.sh $(LIB)/rex
  20.     if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
  21.     sed "s;LIB;$(LIB);g" < rex.sh > $(BIN)/rex
  22.     chmod a+rx $(BIN)/rex
  23.     install -c -s -m 755 rex $(LIB)/rex
  24.     install -c -m 644 Scanner.Tab $(LIB)/rex
  25.     install -c -m 644 Parser.Tab $(LIB)/rex
  26.     cp ../lib/S* $(LIB)/rex
  27.     chmod a+r $(LIB)/rex/S*
  28.  
  29. # installation directories
  30.  
  31. $(LIB)/rex:    $(LIB)
  32.     sh -c "if test ! -d $(LIB)/rex; then mkdir $(LIB)/rex; else true; fi"
  33.  
  34. # swap all byte pairs of the files Scanner.Tab and Parser.Tab
  35.  
  36. bin.conv:
  37.     dd conv=swab < Scanner.Tab > .Scanner.Tab; mv .Scanner.Tab Scanner.Tab
  38.     dd conv=swab < Parser.Tab > .Parser.Tab; mv .Parser.Tab Parser.Tab
  39.  
  40.  
  41. # HEAD
  42.  
  43. sources    : Classes.h
  44.  
  45. sources    : Classes.c
  46. Classes.o    : Classes.c Classes.h
  47. Classes.o    : Tree0.h
  48. Classes.o    : Dfa.h
  49.  
  50. sources    : DefTable.h
  51. DefTable.h    : Tree.h
  52.  
  53. sources    : DefTable.c
  54. DefTable.o    : DefTable.c DefTable.h
  55. DefTable.o    : Tree.h
  56.  
  57. sources    : Dfa.h
  58.  
  59. sources    : Dfa.c
  60. Dfa.o    : Dfa.c Dfa.h
  61. Dfa.o    : GenTabs.h
  62. Dfa.o    : Classes.h
  63.  
  64. sources    : Errors.h
  65.  
  66. sources    : Errors.c
  67. Errors.o    : Errors.c Errors.h
  68.  
  69. sources    : Eval.h
  70. Eval.h    : Tree0.h
  71.  
  72. sources    : Eval.c
  73. Eval.o    : Eval.c Eval.h
  74. Eval.o    : Tree0.h
  75. Eval.o    : Classes.h
  76. Eval.o    : Dfa.h
  77. Eval.o    : Tree.h
  78.  
  79. sources    : GenTabs.h
  80. GenTabs.h    : Tree.h
  81.  
  82. sources    : GenTabs.c
  83. GenTabs.o    : GenTabs.c GenTabs.h
  84. GenTabs.o    : DefTable.h
  85. GenTabs.o    : Tree.h
  86. GenTabs.o    : Nfa.h
  87. GenTabs.o    : Dfa.h
  88. GenTabs.o    : Traces.h
  89. GenTabs.o    : ScanTabs.h
  90. GenTabs.o    : ScanGen.h
  91. GenTabs.o    : Classes.h
  92.  
  93. sources    : Nfa.h
  94. Nfa.h    : ScanTabs.h
  95.  
  96. sources    : Nfa.c
  97. Nfa.o    : Nfa.c Nfa.h
  98. Nfa.o    : ScanTabs.h
  99. Nfa.o    : GenTabs.h
  100.  
  101. sources    : Parser.h
  102.  
  103. sources    : Parser.c
  104. Parser.o    : Parser.c Parser.h
  105. Parser.o    : Scanner.h
  106. Parser.o    : Errors.h
  107. Parser.o    : Errors.h
  108. Parser.o    : Tree0.h
  109. Parser.o    : Tree.h
  110. Parser.o    : DefTable.h
  111. Parser.o    : GenTabs.h
  112. Parser.o    : Dfa.h
  113. Parser.o    : ScanGen.h
  114.  
  115. sources    : ScanGen.h
  116.  
  117. sources    : ScanGen.c
  118. ScanGen.o    : ScanGen.c ScanGen.h
  119. ScanGen.o    : Errors.h
  120. ScanGen.o    : DefTable.h
  121. ScanGen.o    : Dfa.h
  122. ScanGen.o    : ScanTabs.h
  123. ScanGen.o    : GenTabs.h
  124.  
  125. sources    : ScanTabs.h
  126.  
  127. sources    : ScanTabs.c
  128. ScanTabs.o    : ScanTabs.c ScanTabs.h
  129. ScanTabs.o    : Dfa.h
  130. ScanTabs.o    : GenTabs.h
  131. ScanTabs.o    : Classes.h
  132. ScanTabs.o    : ScanGen.h
  133.  
  134. sources    : Scanner.h
  135.  
  136. sources    : Scanner.c
  137. Scanner.o    : Scanner.c Scanner.h
  138. Scanner.o    : Errors.h
  139. Scanner.o    : ScanGen.h
  140.  
  141. sources    : Traces.h
  142. Traces.h    : Dfa.h
  143.  
  144. sources    : Traces.c
  145. Traces.o    : Traces.c Traces.h
  146. Traces.o    : Dfa.h
  147. Traces.o    : GenTabs.h
  148.  
  149. sources    : Tree.h
  150.  
  151. sources    : Tree.c
  152. Tree.o    : Tree.c Tree.h
  153.  
  154. sources    : Tree0.h
  155. Tree0.h    : Tree.h
  156.  
  157. sources    : Tree0.c
  158. Tree0.o    : Tree0.c Tree0.h
  159.  
  160. sources    : rex.c
  161. all    : rex
  162. rex.o    : rex.c
  163. rex.o    : Scanner.h
  164. rex.o    : Parser.h
  165. rex.o    : Classes.h
  166. rex.o    : Eval.h
  167. rex.o    : Tree.h
  168. rex.o    : Tree0.h
  169. rex.o    : Dfa.h
  170. rex.o    : GenTabs.h
  171. rex.o    : ScanGen.h
  172.  
  173. SYSTEM_.o    : SYSTEM_.c SYSTEM_.h
  174.  
  175. rex    : $(SYSTEM)    \
  176.     rex.o    \
  177.     ScanGen.o    \
  178.     GenTabs.o    \
  179.     Classes.o    \
  180.     Dfa.o    \
  181.     Tree0.o    \
  182.     Tree.o    \
  183.     ScanTabs.o    \
  184.     Traces.o    \
  185.     Nfa.o    \
  186.     DefTable.o    \
  187.     Errors.o    \
  188.     Eval.o    \
  189.     Parser.o    \
  190.     Scanner.o    \
  191. ;    $(CC) $(CFLAGS) -o rex $(SYSTEM)    \
  192.     rex.o    \
  193.     ScanGen.o    \
  194.     GenTabs.o    \
  195.     Classes.o    \
  196.     Dfa.o    \
  197.     Tree0.o    \
  198.     Tree.o    \
  199.     ScanTabs.o    \
  200.     Traces.o    \
  201.     Nfa.o    \
  202.     DefTable.o    \
  203.     Errors.o    \
  204.     Eval.o    \
  205.     Parser.o    \
  206.     Scanner.o    \
  207.     $(CLIBS)
  208.  
  209. # TAIL
  210.  
  211. clean    :
  212.     rm -f core *.o
  213.  
  214. .SUFFIXES: .md .mi .h .c .o
  215.  
  216. .mi.c:
  217.     mtc $(MFLAGS) $*.mi;
  218.  
  219. .md.h:
  220.     mtc $(MFLAGS) $*.md;
  221.  
  222. .c.o:
  223.     $(CC) $(CFLAGS) -c $*.c;
  224.